package com.cn.springcloudwechat.model.articleAndMenu;

import org.joda.time.DateTime;

import java.io.Serializable;
import java.util.Date;

/**
 *@program: YmScrollArticle
 *@author: Administrator
 *@create: 2018-07-18 11:56
 */
public class YmScrollArticle implements Serializable{
    private static final long serialVersionUID = 8834734383062900617L;
    /**
     * 轮播文章主键id
     */
    private Long scrollArticleId;
    /**
     * 文章id
     */
    private Long articleId;
    /**
     * 封面图url
     */
    private String coverPictureUrl;
    /**
     * 所属类型
     */
    private Short scrollType;
    /**
     * 状态
     */
    private Short state;
    /**
     * 创建时间
     */
    private Date createDate;
    /**
     * 修改时间
     */
    private Date updateDate;
    /**
     * 创建时间str yyyy-MM-dd
     */
    private String strCreateDate;
    /**
     * 修改时间str yyyy-MM-dd
     */
    private String strUpdateDate;
    /**
     *  附件url
     */
    private String attachmentUrl;
    /**
     * 文章标题
     */
    private String articleTitle;

    public String getArticleTitle() {
        return articleTitle;
    }

    public YmScrollArticle setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle;
        return this;
    }

    public String getAttachmentUrl() {
        return attachmentUrl;
    }

    public YmScrollArticle setAttachmentUrl(String attachmentUrl) {
        this.attachmentUrl = attachmentUrl;
        return this;
    }

    public String getStrCreateDate() {
        return strCreateDate;
    }

    public String getStrUpdateDate() {
        return strUpdateDate;
    }

    public Long getScrollArticleId() {
        return scrollArticleId;
    }

    public void setScrollArticleId(Long scrollArticleId) {
        this.scrollArticleId = scrollArticleId;
    }

    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public String getCoverPictureUrl() {
        return coverPictureUrl;
    }

    public void setCoverPictureUrl(String coverPictureUrl) {
        this.coverPictureUrl = coverPictureUrl == null ? null : coverPictureUrl.trim();
    }

    public Short getScrollType() {
        return scrollType;
    }

    public YmScrollArticle setScrollType(Short scrollType) {
        this.scrollType = scrollType;
        return this;
    }

    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.strCreateDate=new DateTime(createDate).toString("yyyy-MM-dd hh:mm:ss");
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.strUpdateDate=new DateTime(updateDate).toString("yyyy-MM-dd hh:mm:ss");
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "YmScrollArticle{" +
                "scrollArticleId=" + scrollArticleId +
                ", articleId=" + articleId +
                ", coverPictureUrl='" + coverPictureUrl + '\'' +
                ", scrollType=" + scrollType +
                ", state=" + state +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", strCreateDate='" + strCreateDate + '\'' +
                ", strUpdateDate='" + strUpdateDate + '\'' +
                ", attachmentUrl='" + attachmentUrl + '\'' +
                '}';
    }
}